<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Rooms;

class StudentController extends Controller
{
    //
    function init(){
        //return 22;
        $r= \App\Student::all();
        dd($r);
    }
    function mydata(Request $request){
        ini_set('date.timezone','Asia/Shanghai');
        echo date('Y-m-d H:i:s');
        echo '<pre>';
        echo $request->u_password.'<br>';
        $a = $request->name;
        var_dump($a);
        var_dump(json_decode($a,true));
        var_dump($request->all());
//        echo $request->url().'<br>';
//        echo $request->fullUrl().'<br>';
//        echo $request->method().'<br>';
        //return getError('错误');
        echo 222;
    }
    function mydatas(Request $request){
        echo $request->url().'<br>';
        echo 23;
    }
    function create_room(Request $request){
        $room_name=$request->room_name;
        $room_code=rand(1,1000000000);
        $room_des=$request->room_des;
        $arr=
        Rooms::create();
    }
    function test(){
        echo 'test';
    }
}

